package com.tuanzi.loan.business.service.banana.impl;

import com.tuanzi.loan.business.entity.banana.LoanBananaBindCardAction;
import com.tuanzi.loan.business.repository.banana.LoanBananaBindCardActionRepository;
import com.tuanzi.loan.business.service.banana.LoanBananaBindCardActionService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.repository.JPAAuditRepository;
import com.tuanzi.loan.core.service.BaseAuditServiceImpl;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.banana.LoanBananaBindCardActionRequest;
import com.tuanzi.loan.vo.response.banana.LoanBananaBindCardActionResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author administrator
 * @createTime 2019-06-13 19:55
 */
@Debug
@Service
@Transactional
@Retryable(value = {RetryException.class})
public class LoanBananaBindCardActionServiceImpl extends BaseAuditServiceImpl<LoanBananaBindCardAction,Long> implements LoanBananaBindCardActionService {
    @Autowired
    private LoanBananaBindCardActionRepository loanBananaBindCardActionRepository;

    @Override
    public Page<LoanBananaBindCardActionResponse> list(PageSearcher<LoanBananaBindCardActionRequest> pageSearcher) {
        return loanBananaBindCardActionRepository.list(pageSearcher.getSearchCondition(),pageSearcher.getPageable());
    }

    @Override
    protected JPAAuditRepository<LoanBananaBindCardAction, Long> getRepository() {
        return loanBananaBindCardActionRepository;
    }
}
